﻿using System;
using System.Collections.Generic;
using System.Text;
using Sinacor.Infra.Service.Security;
using Sinacor.Infra.Service.ExceptionHandling;
using System.ServiceModel;
using Sinacor.Service.Infra.AuthorizationService.Service.DataContract.Response;
using Sinacor.Infra.Service.Security.Services;

namespace Sinacor.Service.Infra.AuthorizationService.Service.ServiceContract
{
	[ExceptionShielding]
    [ServiceContract(Namespace = "http://www.bovespa.com.br/Sinacor.Service.Infra.AuthorizationService.Service.ServiceContract", Name = "IPolicy", SessionMode = SessionMode.Allowed)]
	public interface IPolicy
	{
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.BusinessFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.ValidationFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.GeneralFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.InvalidSessionFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.LicensingFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.AccessIsDeniedFault))] 
        [OperationLog]
        [OperationContract(IsTerminating = false, IsInitiating = true, IsOneWay = false, AsyncPattern = false, Action = "RetrievePolicies")]
        List<DataContract.Response.PolicyResponse> RetrievePolicies(DataContract.Request.RetrievePoliciesRequest request);

        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.BusinessFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.ValidationFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.GeneralFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.InvalidSessionFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.LicensingFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.AccessIsDeniedFault))] 
        [OperationLog]
        [OperationContract(IsTerminating = false, IsInitiating = true, IsOneWay = false, AsyncPattern = false, Action = "RetrievePolicy")]
        DataContract.Response.PolicyResponse RetrievePolicy(DataContract.Request.RetrievePolicyRequest request);

        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.BusinessFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.ValidationFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.GeneralFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.InvalidSessionFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.LicensingFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.AccessIsDeniedFault))] 
        [OperationLog]
        [OperationContract(IsTerminating = false, IsInitiating = true, IsOneWay = false, AsyncPattern = false, Action = "InsertPolicy")]
        DataContract.Response.PolicyResponse InsertPolicy(DataContract.Request.InsertPolicyRequest request);

        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.BusinessFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.ValidationFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.GeneralFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.InvalidSessionFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.LicensingFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.AccessIsDeniedFault))] 
        [OperationLog]
        [OperationContract(IsTerminating = false, IsInitiating = true, IsOneWay = false, AsyncPattern = false, Action = "UpdatePolicy")]
        void UpdatePolicy(DataContract.Request.UpdatePolicyRequest request);

        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.BusinessFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.ValidationFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.GeneralFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.InvalidSessionFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.LicensingFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.AccessIsDeniedFault))] 
        [OperationLog]
        [OperationContract(IsTerminating = false, IsInitiating = true, IsOneWay = false, AsyncPattern = false, Action = "DeletePolicy")]
        void DeletePolicy(DataContract.Request.DeletePolicyRequest request);

        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.BusinessFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.ValidationFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.GeneralFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.InvalidSessionFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.LicensingFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.AccessIsDeniedFault))] 
        [OperationLog]
        [OperationContract(IsTerminating = false, IsInitiating = true, IsOneWay = false, AsyncPattern = false, Action = "RetrieveUserBehaviorPolicies")]
        List<DataContract.Response.BehaviorPolicyResponse> RetrieveUserBehaviorPolicies(DataContract.Request.RetrieveUserBehaviorPoliciesRequest request);

        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.BusinessFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.ValidationFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.GeneralFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.InvalidSessionFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.LicensingFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.AccessIsDeniedFault))] 
        [OperationLog]
        [OperationContract(IsTerminating = false, IsInitiating = true, IsOneWay = false, AsyncPattern = false, Action = "RetrieveBehaviorPolicies")]
        List<DataContract.Response.BehaviorPolicyResponse> RetrieveBehaviorPolicies(DataContract.Request.RetrieveBehaviorPoliciesRequest request);

        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.BusinessFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.ValidationFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.GeneralFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.InvalidSessionFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.LicensingFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.AccessIsDeniedFault))] 
        [OperationLog]
        [OperationContract(IsTerminating = false, IsInitiating = true, IsOneWay = false, AsyncPattern = false, Action = "RetrieveBehaviorPolicy")]
        DataContract.Response.BehaviorPolicyResponse RetrieveBehaviorPolicy(DataContract.Request.RetrieveBehaviorPolicyRequest request);

        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.BusinessFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.ValidationFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.GeneralFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.InvalidSessionFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.LicensingFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.AccessIsDeniedFault))] 
        [OperationLog]
        [OperationContract(IsTerminating = false, IsInitiating = true, IsOneWay = false, AsyncPattern = false, Action = "InsertBehaviorPolicy")]
        void InsertBehaviorPolicy(DataContract.Request.InsertBehaviorPolicyRequest request);

        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.BusinessFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.ValidationFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.GeneralFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.InvalidSessionFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.LicensingFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.AccessIsDeniedFault))] 
        [OperationLog]
        [OperationContract(IsTerminating = false, IsInitiating = true, IsOneWay = false, AsyncPattern = false, Action = "UpdateBehaviorPolicy")]
        void UpdateBehaviorPolicy(DataContract.Request.UpdateBehaviorPolicyRequest request);

        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.BusinessFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.ValidationFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.GeneralFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.InvalidSessionFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.LicensingFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.AccessIsDeniedFault))] 
        [OperationLog]
        [OperationContract(IsTerminating = false, IsInitiating = true, IsOneWay = false, AsyncPattern = false, Action = "DeleteBehaviorPolicy")]
        void DeleteBehaviorPolicy(DataContract.Request.DeleteBehaviorPolicyRequest request);
    
    }
}